package com.javashizhan.demo.restclient.client;

import com.javashizhan.demo.restclient.client.core.RestClient;
import com.javashizhan.demo.restclient.client.core.RestClientPath;
import com.javashizhan.demo.restclient.domain.ResponseResult;
import com.javashizhan.demo.restclient.domain.User;

/**
 * 
 * @Description: Rest接口类，通过注解声明行为，Java动态代理来实现一个Rest接口调用
 *
 * @author 飞流
 * @date 2019年8月16日
 * @知识星球 Java实战营
 * @微信公众号 JAVA栈实战营
 * @站点 http://javashizhan.com/
 *
 */
@RestClient
public interface UserClient {

	@RestClientPath(url = "http://localhost:7000/findUserByName")
	ResponseResult<User> findUserByName(String userName) throws Exception;

	@RestClientPath(url = "http://localhost:7000/createUser")
	ResponseResult<Void> createUser(User user) throws Exception;
}
